- imageFileName
- The name of the file containing the image.
- documentFileName
- The name of the result document file.
- zoneFileNames
- Optional list of file names for prepared zone files for the pages. This parameter can be a null (Nothing in Visual Basic) reference.
- documentFormat
- The output document format.
- callback
- Optional callback to show operation progress.
Visual Basic (Declaration) | |
---|---|
Overloads Overridable Sub Run( _ ByVal imageFileName As String, _ ByVal documentFileName As String, _ ByVal zoneFileNames As IList(Of String), _ ByVal documentFormat As OcrDocumentFormat, _ ByVal callback As OcrProgressCallback _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
virtual void Run( string imageFileName, string documentFileName, IList<string> zoneFileNames, OcrDocumentFormat documentFormat, OcrProgressCallback callback ) |
C++/CLI | |
---|---|
virtual void Run( String^ imageFileName, String^ documentFileName, IList<String>^ zoneFileNames, OcrDocumentFormat documentFormat, OcrProgressCallback^ callback ) |
Parameters
- imageFileName
- The name of the file containing the image.
- documentFileName
- The name of the result document file.
- zoneFileNames
- Optional list of file names for prepared zone files for the pages. This parameter can be a null (Nothing in Visual Basic) reference.
- documentFormat
- The output document format.
- callback
- Optional callback to show operation progress.
(Deprecated) Use Run(string, string, IList<string>, DocumentFormat, OcrProgressCallback) instead.
This method will perform the following operations:
Create an IOcrDocument object to store the pages into. Load the raster image pages from imageFileName add them the IOcrDocument.Pages collection using IOcrPageCollection.AddPage. If zoneFileNames contains a valid zone file name for the current page (the index in this array matches the index of the page being loaded), the zones are loaded with IOcrPage.LoadZones and applied to the page. If zoneFileNames is a null (Nothing in Visual Basic) reference or its entry for the current page is a null reference, auto-decomposing of the page is performed instead with IOcrPage.AutoZone. Calls IOcrPage.Recognize on each IOcrPage to get the OCR data of the page . Saves the IOcrDocument object to the result file name specified in documentFileName using the format specified in documentFormat. Finally, deletes the IOcrDocument object by calling IOcrDocument.Dispose.
You can use the OcrProgressCallback to show the operation progress or to abort it. For more information and an example, refer to OcrProgressCallback.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
Reference
IOcrAutoRecognizeManager InterfaceIOcrAutoRecognizeManager Members
Overload List
DocumentFormat
IOcrPageCollection Interface
IOcrDocument.Pages
IOcrPage Interface
OcrAutoPreprocessPageCommand Enumeration
OcrZone Structure
IOcrZoneCollection Interface
IOcrPage.Zones
IOcrPage.LoadZones
IOcrPage.AutoZone
IOcrDocument Interface
IOcrDocumentManager Interface
IOcrEngine.DocumentManager
IOcrEngine Interface
OcrEngineManager Class
OcrEngineType Enumeration
Programming with Leadtools .NET OCR